{extends file="../global.html"}
{block name=body}


 
<title>君忆机构</title>
 <style>
  .sj-order{
    display: inline-block;
}
.rotate{
    transform-origin:center center; //旋转中心要是正中间 才行
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    transition: transform 0.2s; //过度时间 可调
    -moz-transition: -moz-transform 0.2s; 
    -moz-transition: -moz-transform 0.2s; 
    -o-transition: -o-transform 0.2s; 
    -ms-transition: -ms-transform 0.2s; 
}
.rotate1{
    transform-origin:center center;
    transform: rotate(0deg); //返回原点
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transition: transform 0.2s; 
    -moz-transition: -moz-transform 0.2s; 
    -moz-transition: -moz-transform 0.2s; 
    -o-transition: -o-transform 0.2s; 
    -ms-transition: -ms-transform 0.2s; 
}
.fasten li{ box-sizing: border-box; }
.fasten li:hover{ background: #FFF4B2 }
.form-horizontal .form-group{ margin:0 60px; }
.yz-code{  cursor:pointer;}
.yz-code:hover{ background: #ddd; }
.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn.active.focus {
    outline: none;
}
#head-div{
  border-bottom: 0.5px solid #e6e6e6;
}
.li-color{ background-color: #5FB878 }
.li-hover-col{ background-color: #84c1ff }
</style>

 
</head>
<body>



 








<div class="container box-flex content">
<div class="left" id="left-div">
<div class="carbrand" >
<div class="search-title ft-weight">品牌</div>
<div class="row" id="brand-model" style="max-height:227px;overflow: hidden; ">


<a href="javascript:;" class="brand-icon  " data-code="" id="typeAll" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
<div class="ft-center">
<div class="sbtn j-sbtn active" style="background-image:url('//img.souche.com//f2e/af82b266a43961d39b3dd855f1d3028e.png');">
</div>
<div class="brand-text"  style="color: #222;text-decoration: none;"> 全部 </div>
</div>
</a>
<!-- 循环品牌 -->
<span id="type-name">
{foreach $tpyeLists as $value}
<a class="brand-icon type-id-{$value.type_id} show-all"   onfocus="this.blur();" style="text-decoration:none;cursor:default;">
<div class="ft-center">
<div class="sbtn j-sbtn"  style="background-image:url('{$absroot}{$value.type_pic}');">
</div>
<div class="brand-text " style="color: #222;"> {$value.type_name} </div>
</div>
</a>
{/foreach}
</span>

<!-- 循环品牌end -->
 
</div>

</div>
<div class="ft-blue more pull-right pointer ft-sm" id="more-brand-btn" style="margin-right: -12px;">更多品牌</div>
<!-- 首付pc -->
<div class="prepaidAmount" style="margin-top: 30px;">
<div class="search-title ft-weight"> 首付 </div>
<div class="row" id="prepaidAmount-model">
<a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 " data-code="" id="paymentAll" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
<div class="sbtn j-sbtn active">
<span>全部</span>
</div>
</a>
<span class="goods-payment">
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="0-10000">
  <div class="sbtn j-sbtn ">
  <span>1万以内</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="10000-20000">
  <div class="sbtn j-sbtn ">
  <span>1-2万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="20000-30000">
  <div class="sbtn j-sbtn ">
  <span>2-3万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="30000-40000">
  <div class="sbtn j-sbtn ">
  <span>3-4万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="40000-50000">
  <div class="sbtn j-sbtn ">
  <span>4-5万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="50000-100000000000">
  <div class="sbtn j-sbtn ">
  <span>5万以上</span>
  </div>
  </a>
</span>
</div>
</div>
<!-- 首付pc_end -->

<div class="installment">
<div class="search-title ft-weight"> 月供 </div>
<div class="row" id="installment-model">
<a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="" id="ygAll">
<div class="sbtn j-sbtn active">
<span>全部</span>
</div>
</a>
<span id="ygMonny">
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="0-1000">
  <div class="sbtn j-sbtn ">
  <span>1000元以内</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="1000-2000">
  <div class="sbtn j-sbtn ">  
  <span>1000-2000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="2000-3000">
  <div class="sbtn j-sbtn ">
  <span>2000-3000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="3000-4000">
  <div class="sbtn j-sbtn ">
  <span>3000-4000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="4000-5000">
  <div class="sbtn j-sbtn ">
  <span>4000-5000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="5000-10000">
  <div class="sbtn j-sbtn ">
  <span>5000元以上</span>
  </div>
  </a>
</span>
</div>
</div>
<div class="carShapeCode">
<div class="search-title ft-weight"> 车型 </div>
<div class="row" id="carShapeCode-model">
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="" id="modelAll">
  <div class="sbtn j-sbtn active">
  <span>全部</span>
  </div>
  </a>
<span id="carModel">
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="微小型车">
  <div class="sbtn j-sbtn ">
  <span>微小型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="紧凑型车">
  <div class="sbtn j-sbtn ">
  <span>紧凑型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="中型车">
  <div class="sbtn j-sbtn ">
  <span>中型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="中大型车">
  <div class="sbtn j-sbtn ">
  <span>中大型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="SUV">
  <div class="sbtn j-sbtn ">
  <span>SUV</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="MPV">
  <div class="sbtn j-sbtn ">
  <span>MPV</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="跑车">
  <div class="sbtn j-sbtn ">
  <span>跑车</span>
  </div>
  </a>
</span>
</div>
</div>

</div>




<!-- ================================================================================================================================================= -->
<!-- ================================================================================================================================================= -->
<!-- ================================================================================================================================================= -->
<!-- ================================================================================================================================================= -->
<!-- ================================================================================================================================================= -->
<!-- 折叠 筛选-->
<div class="modal fade hidden-md hidden-lg hidden-sm" id="myModal-mobiel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
     <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">条件筛选</h4>
          </div>  


<br>

<div class="hidden-lg hidden-md hidden-sm" id=""  style="padding:0 10px;">
<div class="carbrand" >
<div class="search-title ft-weight">品牌</div>


</div>
 <hr>
<!-- 首付pc -->
<div class="prepaidAmount" style="margin-top: 30px;">
<div class="search-title ft-weight"> 首付 </div>

</div>
<!-- 首付pc_end -->
<hr>
<div class="installment">
<div class="search-title ft-weight"> 月供 </div>

</div>
<hr>
<div class="carShapeCode">
<div class="search-title ft-weight"> 车型 </div>

</div>
</div>
</div>
</div>
</div>
<!-- ==================================================================================================================================================== -->
<!-- ==================================================================================================================================================== -->
<!-- ==================================================================================================================================================== -->
<!-- ==================================================================================================================================================== -->
<!-- ==================================================================================================================================================== -->






<div class="right flex-1" id="search-div">
<div class="row">
  <div class="hidden-sm hidden-lg hidden-md ">

  </div>
</div>
<!--搜索框-->
<div class="hidden-md hidden-lg hidden-sm ft-center m-height intention-car yxcx">想买什么车告诉我们，<span class="ft-orange">帮您找</span>
<img src="//assets.souche.com/projects/finance/vanille/images/detail/h5_orangearrow.png?BIU=e44046d1fcdb485c605662b843dab7a0" width="7" alt="">
</div>

<div style="position:relative;">
<div class="search-box box-flex ft-sm">

<div class="flex-1 search">
<img src="{$home}/images/search-ico.png" width="16" alt="">
<input type="text" placeholder="搜索品牌或车系" value="" id="search-input">
<ul class="search-list fn-hide" id="mask-search">

</ul>
</div>
<div class="search-right box-flex">
<div class="flex-1 hidden-md hidden-lg">
<div class="flex-1 border-left filter" id="filter-li" onclick="mobileModal()">
<span class="hidden-xs">条件筛选</span>
<i class="glyphicon glyphicon-sort-by-attributes-alt" >筛选</i>
</div>

</div>
<!-- <div class="flex-1">
<div class="search-select">
pc
<div class="desc-default border-left">
<span class="hidden-xs" id="sortName">填写意向车型</span>
<img class="hidden-xs sj-order" src="{$home}images/pc_black_arrow.png" width="8" alt="">
<img class="hidden-md hidden-sm hidden-lg" src="{$home}images/pc_black_arrow.png" width="16" alt="">
</div>
 

mobile
<ul class="fasten" style="margin-top: 5px;border-top: 1px solid #ccc">
<li class="sort default"> <span>默认排序</span> </li>
<li class="sort desc"> <span>首付最低</span> </li>
<li class="sort"> <span>首付最高</span> </li>
</ul>
 
</div>
</div> -->
</div>


</div>
<!-- h5筛选框 -->

<div style="" class="hidden-sm hidden-md hidden-lg" id="h5-sel" >

<p class="ft-16"><strong> 品牌</strong></p>

<div class="row" id="brand-model" >

<a href="javascript:;" class="col-md-6 col-sm-4 col-xs-6 " data-code="" id="mobile-paymentAll" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
<div class="sbtn j-sbtn active" id="h5-paymtAll">
<span>全部</span>
</div>
</a>
<!-- 循环品牌 -->
<span id="mobile-type-name">
{foreach $tpyeLists as $value}
<a class="brand-icon type-id-{$value.type_id} show-all col-xs-6 col-sm-6 col-md-6"   onfocus="this.blur();" style="text-decoration:none;cursor:default;">
<div class="ft-center">
 
<div class="brand-text sbtn" style="color: #222;"> {$value.type_name} </div>
</div>
</a>
{/foreach}
</span>

<!-- 循环品牌end -->
 
</div>
<p class="ft-16"><strong> 首付</strong></p>
<div class="row" id="prepaidAmount-model">
<a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 " data-code="" id="mobile-sf-all" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
<div class="sbtn j-sbtn active">
<span>全部</span>
</div>
</a>
<span class="mobile-goods-payment">
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="0-10000">
  <div class="sbtn j-sbtn ">
  <span>1万以内</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="10000-20000">
  <div class="sbtn j-sbtn ">
  <span>1-2万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="20000-30000">
  <div class="sbtn j-sbtn ">
  <span>2-3万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="30000-40000">
  <div class="sbtn j-sbtn ">
  <span>3-4万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="40000-50000">
  <div class="sbtn j-sbtn ">
  <span>4-5万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="50000-100000000000">
  <div class="sbtn j-sbtn ">
  <span>5万以上</span>
  </div>
  </a>
</span>
</div>

<p class="ft-16"><strong> 月供</strong></p>

<div class="row" id="installment-model">
<a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="" id="mobile-ygAll" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
<div class="sbtn j-sbtn active">
<span>全部</span>
</div>
</a>
<span id="mobile-ygMonny">
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="0-1000" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>1000元以内</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="1000-2000" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">  
  <span>1000-2000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="2000-3000" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>2000-3000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="3000-4000" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>3000-4000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="4000-5000" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>4000-5000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="5000-10000" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>5000元以上</span>
  </div>
  </a>
</span>
</div>

<p class="ft-16"><strong> 车型</strong></p>

<div class="row" id="carShapeCode-model">
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="" id="mobile-modelAll" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn active">
  <span>全部</span>
  </div>
  </a>
<span id="mobile-carModel">
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="微小型车" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>微小型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="紧凑型车" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>紧凑型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="中型车" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>中型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="中大型车" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>中大型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="SUV" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>SUV</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="MPV" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>MPV</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="跑车" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
  <div class="sbtn j-sbtn ">
  <span>跑车</span>
  </div>
  </a>
</span>
</div>

</div>

</div>
<div style="" class=""></div>
<!--没有数据时显示-->
<div class="no-car ft-center fn-hide" id="no-car-div">
  <div class="row">
  <div class="col-md-12">
  
  <p></p>
  <div class="ft-gray3 ft-16">暂无相关车辆</div>
  <div class="ft-gray3 ft-16">想买什么车，告诉我们</div>
  <div class="sbtn intention intention-car yxcx" >填写意向车型</div>
  </div>
  </div>
</div>
<div class="list" id="carlist-div" style="padding-top: 5px;">
<!-- pc -->


<span id="goods-name">

</span>
<!-- pc_end -->


<!-- 移动端 -->
<div style="" class="hidden-lg hidden-md hidden-sm bg-rgba">

<span id="mobile-goods-name">


</span>

</div>


<!-- {foreach $typeAttribute as $typeVal}
<div class="hidden-md hidden-lg hidden-sm car-item j-car-item" data-type-name="{$typeVal.type_name}">
<div class="item box-flex border-bottom">
<div class="car-image" style="background-image: url({$absroot}{$typeVal.goods_pic});"></div>
<div class="flex-1">
<div class="car-info">
<div class="title ft-ellipsis">{$typeVal.goods_name} </div>
<div class="ft-sm ft-ellipsis"> {$typeVal.goods_model}款  {$typeVal.goods_describe} {$typeVal.goods_car}</div>
<div class="price ft-orange ft-sm">
首付
<span class="ft-weight">  {$typeVal.goods_payment}</span> 万&nbsp;
<img src="//assets.souche.com/projects/finance/vanille/images/list/list_line_3x.png?BIU=7df58a9e9ae1a1b79ae2fcf75c2ca488" height="10" alt="">&nbsp;
月供{$typeVal.goods_month}元
</div>
<div class="ft-gray3 ft-sm">指导价 {$typeVal.goods_price}万起</div>
</div>
</div>
</div>
</div>
{/foreach} -->
<!-- 移动端end -->


</div>
 
<div id="intention-2"> 
<!-- 分页 -->
     <div style="text-align: center;margin-top: 20px;" class="page-view">
     <input type="button" id="fpbtn" value="首页" class="btn btn-primary" />
     <input type="button" id="rpbtn" value="上页" class="btn btn-primary"/>
     <input type="button" id="npbtn" value="下页" class="btn btn-primary"/>
     <input type="button" id="lpbtn" value="尾页" class="btn btn-primary"/>
      </div>
<!-- 分页end -->
<!-- <div id="demo2"></div> -->
<!-- <div class="box" id="box"></div> -->
<div id="intention-show">
<div class="m-height hidden-xs">
<p class="ft-center ft-gray" id="word_to_you">想买什么车，告诉我们</p>
<!-- <p class="ft-center ft-gray" class="word_to_you_all">想弹什么车，告诉我们</p> -->
<div class="sbtn intention intention-car yxcx"  > 填写意向车型 </div>
</div>

</div>
<div id="loading" class="fn-hide ft-center m-height ft-gray">正在加载更多数据...</div>
</div>
</div>
</div>

 
 
<!-- <script src="{$home}js/fang/list.js"></script> -->
<script src="{$home}layui-2.0/layui.js"></script>




<script type="text/javascript">


var jsonObj = '{$typeAttributes}';//获取json
  jsonObj = eval("("+jsonObj+")");//json转js对象
  // console.log(jsonObj);
function mobileModal(){
  if($('#h5-sel').css('display')=='none'){
   $('#h5-sel').show();
    $('.bg-rgba').css({ "background":"rgba(0, 0, 0,.1)"});
  
  }else{
   $('#h5-sel').hide();
   $('.bg-rgba').css('background','#fff');
  }
}




  //pc-公用
function jsonAll(jsonObj){

  var arr = [];
  for(var i in jsonObj){

      if(jsonObj[i]['sfIsChoosen']=='YES' && jsonObj[i]['typeIsChoosen']=='YES' && jsonObj[i]['ygIsChoosen']=='YES' &&  jsonObj[i]['cxIsChoosen']=='YES' ){
        arr.push(jsonObj[i]);

      }
  }
  page(arr);
  if($('#goods-name').html()==''){
  
    $('#no-car-div').removeClass('fn-hide');
    $('#intention-2').hide();
  }else{
    $('#no-car-div').addClass('fn-hide');
    $('#intention-2').show();
  }
}

//h5-json公用
function mobileJsonAll(jsonObj){

  var arr = [];
  for(var i in jsonObj){

      if(jsonObj[i]['sfIsChoosen']=='YES' && jsonObj[i]['typeIsChoosen']=='YES' && jsonObj[i]['ygIsChoosen']=='YES' &&  jsonObj[i]['cxIsChoosen']=='YES' ){
        arr.push(jsonObj[i]);

      }
  }
  page(arr);
  if($('#mobile-goods-name').html()==''){
  
    $('#no-car-div').removeClass('fn-hide');
    $('#intention-2').hide();
  }else{
    $('#no-car-div').addClass('fn-hide');
    $('#intention-2').show();
  }
}
/*
*pagerow每页显示"+pagerow+"条
*pagenum当前页的

 */
// 分页js
function page(obj){
   var rowcount = obj.length;
   var pagerow = 5;
   var pagecount = Math.ceil(rowcount/pagerow);
   var pagecontent =obj;
   var pagenum = 1;
   loadtpage(pagecontent,pagerow,1);
   mobileLoadtpage(pagecontent,pagerow,1)
  
     if (pagenum == 1) {
    $("#fpbtn").attr("disabled", true);//首页
    $("#rpbtn").attr("disabled", true);
    
   }else {
    $("#fpbtn").removeAttr("disabled");
    $("#rpbtn").removeAttr("disabled");
   }
   if (pagenum == pagecount) {
    $("#npbtn").attr("disabled", true);
    $("#lpbtn").attr("disabled", true);
   }else {
    $("#npbtn").removeAttr("disabled");
    $("#lpbtn").removeAttr("disabled");
   }
   $("#fpbtn").click(function(){
    loadtpage(pagecontent,pagerow,1);
    mobileLoadtpage(pagecontent,pagerow,1);

    pagenum = 1;
   
    if (pagenum == 1) {
    $("#fpbtn").attr("disabled", true);//首页
    $("#rpbtn").attr("disabled", true);
    
   }else {
    $("#fpbtn").removeAttr("disabled");
    $("#rpbtn").removeAttr("disabled");
   }
   if (pagenum == pagecount) {
    $("#npbtn").attr("disabled", true);
    $("#lpbtn").attr("disabled", true);
   }else {
    $("#npbtn").removeAttr("disabled");
    $("#lpbtn").removeAttr("disabled");
   }
   });
   $("#rpbtn").click(function(){
    loadtpage(pagecontent,pagerow,(pagenum - 1));
  mobileLoadtpage(pagecontent,pagerow,(pagenum - 1));
    pagenum = pagenum - 1;
   
    if (pagenum == 1) {
    $("#fpbtn").attr("disabled", true);//首页
    $("#rpbtn").attr("disabled", true);
    
   }else {
    $("#fpbtn").removeAttr("disabled");
    $("#rpbtn").removeAttr("disabled");
   }
   if (pagenum == pagecount) {
    $("#npbtn").attr("disabled", true);
    $("#lpbtn").attr("disabled", true);
   }else {
    $("#npbtn").removeAttr("disabled");
    $("#lpbtn").removeAttr("disabled");
   }
   });
   $("#npbtn").click(function(){
    if ((pagenum + 1) >= pagecount){
     loadtpage(pagecontent,pagerow,pagecount);
    mobileLoadtpage(pagecontent,pagerow,pagecount);
      pagenum = pagecount;
     
      if (pagenum == 1) {
    $("#fpbtn").attr("disabled", true);//首页
    $("#rpbtn").attr("disabled", true);
    
   }else {
    $("#fpbtn").removeAttr("disabled");
    $("#rpbtn").removeAttr("disabled");
   }
   if (pagenum == pagecount) {
    $("#npbtn").attr("disabled", true);
    $("#lpbtn").attr("disabled", true);
   }else {
    $("#npbtn").removeAttr("disabled");
    $("#lpbtn").removeAttr("disabled");
   }
  }else{
     loadtpage(pagecontent,pagerow,(pagenum + 1));
  mobileLoadtpage(pagecontent,pagerow,(pagenum + 1));
    // pagenum = pagecount;
    pagenum = pagenum + 1;
   
    if (pagenum == 1) {
    $("#fpbtn").attr("disabled", true);//首页
    $("#rpbtn").attr("disabled", true);
    
   }else {
    $("#fpbtn").removeAttr("disabled");
    $("#rpbtn").removeAttr("disabled");
   }
   if (pagenum == pagecount) {
    $("#npbtn").attr("disabled", true);
    $("#lpbtn").attr("disabled", true);
   }else {
    $("#npbtn").removeAttr("disabled");
    $("#lpbtn").removeAttr("disabled");
   }
  }
   });
   $("#lpbtn").click(function(){
    loadtpage(pagecontent,pagerow,pagecount);
  mobileLoadtpage(pagecontent,pagerow,pagecount);
    pagenum = pagecount;
   
    if (pagenum == 1) {
    $("#fpbtn").attr("disabled", true);//首页
    $("#rpbtn").attr("disabled", true);
    
   }else {
    $("#fpbtn").removeAttr("disabled");
    $("#rpbtn").removeAttr("disabled");
   }
   if (pagenum == pagecount) {
    $("#npbtn").attr("disabled", true);
    $("#lpbtn").attr("disabled", true);
   }else {
    $("#npbtn").removeAttr("disabled");
    $("#lpbtn").removeAttr("disabled");
   }
   });
}
 
 

function loadtpage(pagecontent,pagerow,page){
  var newArr = [];
  var j=1;
  if(pagecontent){
    for(var x=(page*pagerow)-pagerow;x<=pagecontent.length-1;x++){

        if(j<=pagerow && x>=0){
            j++;
            newArr.push(pagecontent[x]);
        }
    }
  }
  $('#goods-name').html('');
  if(newArr){
    for(var i in newArr){

      var status = '';
        if(newArr[i]['goods_status']==1){
           status = '{$home}images/911c604c2ec79bbb990c45303cd8f8ea.png';
        }
      goodsHtml ='<a class="car-item j-car-item hidden-xs type-id-"'+newArr[i]["type_id"]+' href="{$absroot}details/'+newArr[i]["goods_id"]+'" target="_blank" data-type-name='+newArr[i]["type_name"]+' data-goods-payment='+newArr[i]["goods_payment"]+' data-type-goods-month='+newArr[i]["goods_month"]+' data-goods-model-car='+newArr[i]["goods_model_car"]+' data-goods-pinyin='+newArr[i]["goods_pinyin"]+' data-type-pinyin='+newArr[i]["type_pinyin"]+'  data-goods-name='+newArr[i]["goods_name"]+'><div class="bg-gray fix-img"style="background-image: url({$absroot}'+newArr[i]["goods_pic"]+');"><img src="'+status+'" alt="" class="is_status" ></div><div class="car-text"><div class="car-title ft-ellipsis">'+newArr[i]["goods_name"]+'</div><div class="car-title ft-ellipsis ft-sm">'+newArr[i]["goods_model"]+'款 '+newArr[i]["goods_describe"]+' '+newArr[i]["goods_car"]+'</div><div class="car-price ft-sm ft-gray3">指导价'+newArr[i]["goods_price"]+'万起</div><div class="car-price ft-orange ft-sm">首付<span class="ft-20 ft-weight">'+newArr[i]["goods_payment"]+'</span>万&nbsp;<span class="ft-gray3">月供'+newArr[i]["goods_month"]+'元</div></span></div></a>';
      $('#goods-name').append(goodsHtml);
        
    }
  }

}

function mobileLoadtpage(pagecontent,pagerow,page){
  var newArr = [];
  var j=1;
  if(pagecontent){
    for(var x=(page*pagerow)-pagerow;x<=pagecontent.length-1;x++){

        if(j<=pagerow && x>=0){
            j++;
            newArr.push(pagecontent[x]);
        }
    }
  }
  $('#mobile-goods-name').html('');
  if(newArr){
    for(var i in newArr){

      var status = '';
        if(newArr[i]['goods_status']==1){
           status = '{$home}images/911c604c2ec79bbb990c45303cd8f8ea.png';
        }
      goodsHtml ='<div class="hidden-md hidden-lg hidden-sm car-item j-car-item" data-type-name='+newArr[i]["type_name"]+'><div class="item box-flex border-bottom"><a href="{$absroot}details/'+newArr[i]["goods_id"]+'" type-id-"'+newArr[i]["type_id"]+' data-type-name='+newArr[i]["type_name"]+' data-goods-payment='+newArr[i]["goods_payment"]+' data-type-goods-month='+newArr[i]["goods_month"]+' data-goods-model-car='+newArr[i]["goods_model_car"]+' data-goods-pinyin='+newArr[i]["goods_pinyin"]+' data-type-pinyin='+newArr[i]["type_pinyin"]+'  data-goods-name='+newArr[i]["goods_name"]+'><div class="car-image"style="background-image: url({$absroot}'+newArr[i]["goods_pic"]+');"></div><div class="flex-1"><img src="'+status+'" alt="" class="is_status" height="56"></a><div class="flex-1"><div class="car-info"><div class="title ft-ellipsis">'+newArr[i]["goods_name"]+'</div><div class="ft-sm ft-ellipsis">'+newArr[i]["goods_model"]+'款 '+newArr[i]["goods_describe"]+' '+newArr[i]["goods_car"]+'</div><div class="price ft-orange ft-sm">首付<span class="ft-weight">'+newArr[i]["goods_payment"]+'</span>万&nbsp;<img src="{$home}images/list_line_3x.png" height="10"alt="">&nbsp;月供'+newArr[i]["goods_month"]+'</div><div class="ft-gray3 ft-sm">指导价'+newArr[i]["goods_price"]+'万起</div></div></div></div></div></div>';
        $('#mobile-goods-name').append(goodsHtml);
        
    }
  }

}
//分页js结束
//页面加载完毕时显示所有数据
 window.onload = function(){ 

  $('#goods-name').html('');
  $('#mobile-goods-name').html('');
    //loadtpage(jsonObj,3,2);
    page(jsonObj);
    //page(jsonObj)
      // mobileGoods(jsonObj)
    //排序
    var sfArr = [];
    $('#goods-name').find('a').each(function(){
      sfArr.push($(this).attr('data-goods-payment')*10000);

})
    // console.log(sfArr);

    function sortarr(arr){
        for(i=0;i<arr.length-1;i++){
            for(j=0;j<arr.length-1-i;j++){
                if(arr[j]>arr[j+1]){
                    var temp=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=temp;
                }
            }
        }
        return arr;
    }
    sortarr(sfArr);
    // console.log(sfArr);

    var dataTypeName = [];
    var dataGooodsName = [];
  

    var x = [];
    var t = [];
   // +','+$(this).attr('data-goods-name')+','+$(this).attr('data-goods-pinyin')
   // pc
    $('#goods-name').find('a').each(function(){
    x.push($(this).attr('data-goods-name')+','+$(this).attr('data-goods-pinyin'));
    t.push($(this).attr('data-type-name')+','+$(this).attr('data-type-pinyin'))
    })
  //h5
   $('#mobile-goods-name').find('a').each(function(){
    x.push($(this).attr('data-goods-name')+','+$(this).attr('data-goods-pinyin'));
    t.push($(this).attr('data-type-name')+','+$(this).attr('data-type-pinyin'))
    })
    x =$.unique(x);//去重
    t =$.unique(t)
    for(var j=0;j<=x.length-1;j++){
      dataTypeName.push(x[j].split(','));
    }
      for(var z=0;z<=t.length-1;z++){
      dataGooodsName.push(t[z].split(','));
    }
  
    // console.log(dataGooodsName);

//处理搜索
    $('#search-input').on('input propertychange',function(){
        $('#mask-search').html('');
 
        var searVal = $.trim($(this).val());
 

        for( var i=0; i<=dataGooodsName.length-1;i++){
          if(dataGooodsName[i][0].indexOf(searVal)!=-1||dataGooodsName[i][1].indexOf(searVal)!=-1 ){
 
                var searchLi = '<li>'+dataGooodsName[i][0]+'</li>';
                var isSearchLi = $('#mask-search').removeClass('fn-hide').append(searchLi);
                $(this).focus(function(){
                   $('#mask-search').removeClass('fn-hide');

               })
          }
            if(searVal==''){
              arr();
              $('#mask-search').html('')
            }
        }

        for( var i=0; i<=dataTypeName.length-1;i++){
          if(dataTypeName[i][0].indexOf(searVal)!=-1||dataTypeName[i][1].indexOf(searVal)!=-1 ){
 
            var searchLi = '<li>'+dataTypeName[i][0]+'</li>';
            var isSearchLi = $('#mask-search').removeClass('fn-hide').append(searchLi);
            $(this).focus(function(){
               $('#mask-search').removeClass('fn-hide');
                
           })
          }
          if(searVal==''){
             
            $('#mask-search').html('')
          }
        
        }

     })

    //排序
     $(function() {
         var usercenter = {
         
     init:function(){
         this.modal();
         
     },
         modal: function() {
          //点击
             $(".desc-default").click(function(){  
              if($('.fasten').css('display')=='none'){
            $('.fasten').show();  
              }
              else{
            $('.fasten').hide();  
              } 
              $('.fasten').find('li').each(function(){
                $(this).click(function(){
                  $('#sortName').text($(this).find('span').text());
                  $(this).css({ "background":"#46a8ef"});
                  $(this).siblings('li').css({ "background":"#FFF"});
                  $('.fasten').hide();  
                  var liVal = $(this).find('span').text();
                      if(liVal=='默认排序'){
                         
                      }
                      else if(liVal=='首付最高'){
                           
                      }
                      else if(liVal=='首付最低'){
                          sortarr(sfArr);
                      }
                })
                  //hover
                $(this).hover(function(){
                  $(this).addClass('li-hover-col');
                  $(this).siblings('li').removeClass('li-hover-col');
                })
              })
                                  
          if($(this).find('.sj-order').hasClass("rotate")){ //点击箭头旋转180度
            $(this).find('.sj-order').removeClass("rotate");
            $(this).find('.sj-order').addClass("rotate1");
          }else{
            $(this).find('.sj-order').removeClass("rotate1"); //再次点击箭头回来
            $(this).find('.sj-order').addClass("rotate");
          }
             })

      
     
         
         }
     }
         usercenter.init();

          
     })

} 






function arr(){
  $('.search').find('ul').addClass('fn-hide');
}
//筛选搜索    
$('.search').on('click','ul li',function(){
    $(this).each(function(){
      $(this).addClass('li-hover-col');
      $(this).siblings('li').removeClass('li-hover-col');
      
      $('.search').find('input[type="text"]').val($(this).text());
      arr();
      $('#goods-name').html('');
      $('#mobile-goods-name').html('');
        var typeNames = $(this).text();
        for(var i in jsonObj){
            if(jsonObj[i]['goods_name']==typeNames || jsonObj[i]['type_name']==typeNames){
              jsonObj[i]['typeIsChoosen']='YES';
            }else{
              jsonObj[i]['typeIsChoosen']='NO';
            }
        }
  
        jsonAll(jsonObj);
        mobileJsonAll(jsonObj)
    })
})
 


/////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//类别全选
$('#typeAll').click(function(){
    $(this).find('.sbtn').addClass('active');
    $('#type-name').find('a').find('.sbtn').removeClass('active');
 
    $('#no-car-div').addClass('fn-hide');

    $('#goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['typeIsChoosen']='YES';
    }
    jsonAll(jsonObj);

})
//h5-类别全选
$('#mobile-paymentAll').bind('click',function(){
    $('#h5-paymtAll').css('background-color','#46a8ef');

    if($('#mobile-type-name').find('a').find('.sbtn').hasClass('active')){
      $('#mobile-type-name').find('a').find('.sbtn').removeClass('active');

    }else{
      $('#h5-paymtAll').css('background-color','#46a8ef');
    }
   
    $('#no-car-div').addClass('fn-hide');
    $('#mobile-goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['typeIsChoosen']='YES';
    }
    mobileJsonAll(jsonObj);
     $('#h5-sel').hide();
})
//首付全选
$('#paymentAll').click(function(){
  $(this).find('.sbtn').addClass('active');
  $('.goods-payment').find('a').find('.sbtn').removeClass('active');
    $('#goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['sfIsChoosen']='YES';
    }
    jsonAll(jsonObj);
})
//h5-首付全选
$('#mobile-sf-all').click(function(){
    if($('.mobile-goods-payment').find('a').find('.sbtn').hasClass('active')){
      $('.mobile-goods-payment').find('a').find('.sbtn').removeClass('active');

    }
  $(this).find('.sbtn').addClass('active');
  $('#no-car-div').addClass('fn-hide');
  $('#mobile-goods-name').html('');
    for(var i in jsonObj){
    jsonObj[i]['sfIsChoosen']='YES';
    }
  mobileJsonAll(jsonObj);
  $('#h5-sel').hide();
})


//月供全选
$('#ygAll').click(function(){
  $(this).find('.sbtn').addClass('active');
  $('#ygMonny').find('a').find('.sbtn').removeClass('active');
    $('#goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['ygIsChoosen']='YES';
    }
    jsonAll(jsonObj);

})
//h5-月供全选
$('#mobile-ygAll').click(function(){
  $(this).find('.sbtn').addClass('active');
  if($('#mobile-ygMonny').find('a').find('.sbtn').hasClass('active')){
    $('#mobile-ygMonny').find('a').find('.sbtn').removeClass('active');

  }
  $(this).find('.sbtn').addClass('active');
  $('#no-car-div').addClass('fn-hide');
     $('#mobile-goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['ygIsChoosen']='YES';
    }
    mobileJsonAll(jsonObj);
    $('#h5-sel').hide();
})
//车型全选
$('#modelAll').click(function(){
   
  $(this).find('.sbtn').addClass('active');
  $('#carModel').find('a').find('.sbtn').removeClass('active');
    $('#goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['cxIsChoosen']='YES';
    }
    jsonAll(jsonObj);

})
//h5-车型全选
$('#mobile-modelAll').click(function(){
  $(this).find('.sbtn').addClass('active');
  if($('#mobile-carModel').find('a').find('.sbtn').hasClass('active')){
    $('#mobile-carModel').find('a').find('.sbtn').removeClass('active');

  }
  $(this).find('.sbtn').addClass('active');
  $('#no-car-div').addClass('fn-hide');
     $('#mobile-goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['cxIsChoosen']='YES';
    }
    mobileJsonAll(jsonObj);
    $('#h5-sel').hide();
})

///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////





//h5类别板块事件
$('#mobile-type-name a').each(function(){
  $(this).click(function(){
    if($('#mobile-paymentAll .sbtn').hasClass('active')){
      $('#mobile-paymentAll .sbtn').css({ 'background-color':'#fff','border-color':'#e6e6e6'});
    }
    $(this).find('.sbtn').addClass('active');
    $(this).siblings('a').find('.sbtn').removeClass('active');
    $('#mobile-goods-name').html('');
    var typeNames = $.trim($(this).find('.ft-center').find('.brand-text').text());

    for(var i in jsonObj){
        if(jsonObj[i]['type_name']==typeNames){
          jsonObj[i]['typeIsChoosen']='YES';
        }else{
          jsonObj[i]['typeIsChoosen']='NO';
        }
    }
      mobileJsonAll(jsonObj);
      $('#h5-sel').hide();
  })
})
//类别板块事件
$('#type-name a').each(function(){
    $(this).click(function(){
    var typeNames = $.trim($(this).find('.ft-center').find('.brand-text').text());
    $(this).find('.sbtn').addClass('active');
    $(this).siblings('a').find('.sbtn').removeClass('active');
    $('#typeAll').find('.sbtn').removeClass('active');

    $('#goods-name').html('');
    for(var i in jsonObj){
        if(jsonObj[i]['type_name']==typeNames){
          jsonObj[i]['typeIsChoosen']='YES';
        }else{
          jsonObj[i]['typeIsChoosen']='NO';
        }
    }
    jsonAll(jsonObj);
    });
});

//h5-首付板块事件
$('.mobile-goods-payment').find('a').each(function(){
  $(this).click(function(){
  var goodsPayment = $(this).attr('data-code');//获取左侧选项首付值
      goodsPayment = goodsPayment.split('-');
  // console.log(goodsPayment);
  
   if($('#mobile-sf-all').find('.sbtn').hasClass('active')){
    $('#mobile-sf-all').find('.sbtn').removeClass('active');
  }
  $(this).find('.sbtn').addClass('active');
  $(this).siblings('a').find('.sbtn').removeClass('active');
  $('#mobile-goods-name').html('');
  for(var i in jsonObj){
      if(parseInt(jsonObj[i]['goods_payment']*10000)<=parseInt(goodsPayment[1]) && parseInt(jsonObj[i]['goods_payment']*10000)>parseInt(goodsPayment[0])){
        jsonObj[i]['sfIsChoosen']='YES';
      }
      else{
        jsonObj[i]['sfIsChoosen']='NO';
      }
  }
   mobileJsonAll(jsonObj);
   $('#h5-sel').hide();
})
})
 //首付板块事件
$('#prepaidAmount-model').find('.goods-payment').find('a').each(function(){
  $(this).click(function(){
    $(this).find('.sbtn').addClass('active');
    $(this).siblings('a').find('.sbtn').removeClass('active');
    $('#paymentAll').find('.sbtn').removeClass('active');
    var goodsPayment = $(this).attr('data-code');//获取左侧选项首付值
      goodsPayment = goodsPayment.split('-');
    $('#goods-name').html('');
     
    for(var i in jsonObj){
        if(parseInt(jsonObj[i]['goods_payment']*10000)<=parseInt(goodsPayment[1]) && parseInt(jsonObj[i]['goods_payment']*10000)>parseInt(goodsPayment[0])){
          jsonObj[i]['sfIsChoosen']='YES';
        }
        else{
          jsonObj[i]['sfIsChoosen']='NO';
        }
    }
    jsonAll(jsonObj);
   })
 })
//月供板块事件
$('#ygMonny').find('a').each(function(){
  
  $(this).click(function(){

    $(this).find('.sbtn').addClass('active');
    $(this).siblings('a').find('.sbtn').removeClass('active');
    $('#ygAll').find('.sbtn').removeClass('active');
    var ygCode = $(this).attr('data-code');
        ygCode = ygCode.split('-');
      // console.log(ygCode);
      $('#goods-name').html('');
      for(var i in jsonObj){
       
        if(parseInt(jsonObj[i]['goods_month'])<=parseInt(ygCode[1]) && parseInt(jsonObj[i]['goods_month'])>parseInt(ygCode[0])){

          jsonObj[i]['ygIsChoosen']='YES';
        }
        else{
          jsonObj[i]['ygIsChoosen']='NO';
        }
      }
      jsonAll(jsonObj);
  })
})
//h5-月供板块事件
$('#mobile-ygMonny').find('a').each(function(){
  $(this).click(function(){
   
   if($('#mobile-ygAll').find('.sbtn').hasClass('active')){
    $('#mobile-ygAll').find('.sbtn').removeClass('active');
  }
  $(this).find('.sbtn').addClass('active');
  $(this).siblings('a').find('.sbtn').removeClass('active');
  var ygCode = $(this).attr('data-code');
        ygCode = ygCode.split('-');
   $('#mobile-goods-name').html('');
   for(var i in jsonObj){
    
     if(parseInt(jsonObj[i]['goods_month'])<=parseInt(ygCode[1]) && parseInt(jsonObj[i]['goods_month'])>parseInt(ygCode[0])){

       jsonObj[i]['ygIsChoosen']='YES';
     }
     else{
       jsonObj[i]['ygIsChoosen']='NO';
     }
   }
   mobileJsonAll(jsonObj);
   $('#h5-sel').hide();
});
});  
//车型板块事件
$('#carModel').find('a').each(function(){
  
  $(this).click(function(){
    var cxCode = $(this).attr('data-code');
    // console.log(cxCode);
    $(this).find('.sbtn').addClass('active');
    $(this).siblings('a').find('.sbtn').removeClass('active');
    $('#modelAll').find('.sbtn').removeClass('active');
    $('#goods-name').html('');
    for(var i in jsonObj){

      if(jsonObj[i]['goods_model_car']===cxCode){

        jsonObj[i]['cxIsChoosen']='YES';
      }
      else{
        jsonObj[i]['cxIsChoosen']='NO';
      }
    }
    jsonAll(jsonObj);

  })
})
//h5-车型板块事件
$('#mobile-carModel').find('a').each(function(){
  $(this).click(function(){
   if($('#mobile-modelAll').find('.sbtn').hasClass('active')){
    $('#mobile-modelAll').find('.sbtn').removeClass('active');
  }
  $(this).find('.sbtn').addClass('active');
  $(this).siblings('a').find('.sbtn').removeClass('active');
    var cxCode = $(this).attr('data-code');

  $('#mobile-goods-name').html('');
  for(var i in jsonObj){

    if(jsonObj[i]['goods_model_car']===cxCode){

      jsonObj[i]['cxIsChoosen']='YES';
    }
    else{
      jsonObj[i]['cxIsChoosen']='NO';
    }
  }
  mobileJsonAll(jsonObj);
  $('#h5-sel').hide();

});
}); 

function hideH5Search(){
  $('#h5-sel').hide();

}



function IsInArray(arr,val){ 
　　var testStr=','+arr.join(",")+","; 
　　return testStr.indexOf(","+val+",")!=-1; 
}  
$('#more-brand-btn').click(function(){
if($('#more-brand-btn').text()=='更多品牌'){
  $('#brand-model').css({ "max-height":""});
  $(this).text('收起品牌');
}
else{
  $(this).text('更多品牌');
  $('#brand-model').css({ "max-height":"227px"});
}
})





 
</script>
<!-- <script src="{$home}js/fang/common.js"></script> -->

{/block}